<?php
require 'class.php';

$klasID = User::getClassID();

$starMngr = new StarManagement($klasID);


if(isset($parameters[1]))
{
	if(isset($parameters[2]) && !ctype_digit($parameters[2]))
	{
		die("Illegal Student number");
	}
	
	switch($parameters[1])
	{
		case 'add':
			echo $starMngr->showAddForm();
			break;
		case 'edit':
			echo $starMngr->showEditForm($parameters[2]);
			break;
		case 'delete':
			echo $starMngr->showDeleteConfirmation($parameters[2]);
			break;
		default:
			echo $starMngr->showList();
			break;
	}
}
else
{
	echo $starMngr->showList();
}